
'
' *  NHibernate 代码模版
' 

Imports System.Collections.Generic

Namespace NCS
	''' <summary>
	'''	
	''' </summary>
	<Serializable()> _
	Public Class chanel

		#Region "构造方法"
		Public Sub New()
			m_ele = Nothing
			m_id = 0

            m_chanelno = 0
            m_enable = True
		End Sub
		#End Region


		#Region "私有变量"
		Private m_ele As String
		Private m_id As Integer
		Private m_chanelno As Short
        Private m_enable As Boolean
		#End Region


		#Region "公有属性"

		'''<summary>
		'''
        '''</summary>
        Public Overridable Property enable() As Boolean
            Get
                Return m_enable
            End Get
            Set(ByVal value As Boolean)
                m_enable = value
            End Set
        End Property
		Public Overridable Property ele() As String
			Get
				Return m_ele
			End Get
			Set
				m_ele = value
			End Set
		End Property

		'''<summary>
		'''
		'''</summary>
		Public Overridable Property id() As Integer
			Get
				Return m_id
			End Get
			Set
				m_id = value
			End Set
		End Property

		'''<summary>
		'''
		'''</summary>
		Public Overridable Property chanelno() As Short
			Get
				Return m_chanelno
			End Get
			Set
				m_chanelno = value
			End Set
		End Property

		#End Region

		#Region "Rewrite Equals and HashCode"
		''' <summary>
		''' 
		''' </summary>
		Public Overloads Overrides Function Equals(obj As Object) As Boolean
			If Me Is obj Then
				Return True
			End If
			If (obj Is Nothing) OrElse (obj.[GetType]() IsNot [GetType]()) Then
				Return False
			End If
			Dim castObj As chanel = DirectCast(obj, chanel)
			Return (castObj IsNot Nothing) AndAlso (m_id = castObj.id)
		End Function
		''' <summary>
		''' 用唯一值实现GetHashCode
		''' </summary>
		Public Overloads Overrides Function GetHashCode() As Integer
			Dim hash As Integer = 57
			hash = 27 * hash * m_id.GetHashCode()
			Return hash
		End Function
		#End Region
	End Class
End Namespace
